Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement/build with vite #2637

Merged
merged 6 commits into from
Oct 31, 2022
Merged

Enhancement/build with vite #2637

merged 6 commits into from
Oct 31, 2022

Conversation

kevgliss
Copy link
Contributor

@kevgliss kevgliss commented Oct 28, 2022

On non-M1 Macs, building the frontend is very slow. This is because Webpack rebuilds all files on every file change. To improve this, I have ported our build config to vite. Vite is much faster because it doesn't attempt to rebuild every file. Instead, serves the files as is. This has three primary improvements for us:

  1. It's much faster (essentially instantly in dev mode)
  2. When debugging it doesn't rely on source maps to view the actual code instead when you step through the debugger you're stepping through the actual code for a 1x1 experience
  3. Hot Module Replacement (HMR) is much faster and more reliable, meaning that we don't have to force an app refresh as often to see the changes being made.

From the developer's POV this is a drop in replacement. All existing build commands (including prod builds) should behave as they have before (barring minor issues).

@kevgliss kevgliss added the enhancement New feature or request label Oct 28, 2022
@lgtm-com
Copy link

lgtm-com bot commented Oct 28, 2022

This pull request fixes 1 alert when merging 25d33f1 into 7fbea42 - view on LGTM.com

fixed alerts:

  • 1 for Unused variable, import, function or class

@kevgliss kevgliss merged commit dd32d24 into master Oct 31, 2022
@kevgliss kevgliss deleted the enhancement/build-with-vite branch October 31, 2022 16:02
@lgtm-com
Copy link

lgtm-com bot commented Oct 31, 2022

This pull request fixes 2 alerts when merging c8121b6 into ecbad47 - view on LGTM.com

fixed alerts:

  • 1 for Wrong name for an argument in a call
  • 1 for Unused variable, import, function or class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant